import React, { useEffect } from 'react';
import './index.css';

const Loading: React.FC = () => {
  const componentWillUnmount = () => {
    console.log('资源已经加载好了')
  }
  useEffect(() => {
    return componentWillUnmount;
  }, []);
  return (
    <div className="loader" style={{
      width: window.innerWidth,
      height: window.innerHeight,
      color: 'white',
    }}>
      <div className="loader-inner">
        <div className="loader-line-wrap">
          <div className="loader-line"></div>
        </div>
        <div className="loader-line-wrap">
          <div className="loader-line"></div>
        </div>
        <div className="loader-line-wrap">
          <div className="loader-line"></div>
        </div>
        <div className="loader-line-wrap">
          <div className="loader-line"></div>
        </div>
        <div className="loader-line-wrap">
          <div className="loader-line"></div>
        </div>
        <div className="loader-text">资源加载中...</div>
      </div>
    </div>
  );
};

export default Loading;
